#adds sample user with login ala and password 123

class AddUserAla123 < ActiveRecord::Migration
  def self.up
  		@role=SystemRole.find(:first,:conditions=>"name='Admin'")
  		@position=Position.find(:first,:conditions=>"name='Academic'")	
  		User.create!(:login => 'ala',:PASSWORD => '123',
  					:position_id=> @position.id,  :role_id=>@role.id, :expiry_date=> Time.now,:activated=>'y',
 					:email=>'ala@pollster.pl')
  	
  end

  def self.down
		User.delete_all
  	
  end
end
